package com.mofang.ticketing.common.core.enums.account;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 权限类型;0=目录、1=菜单、2=操作、按钮
 *
 * @author LGC
 */
@Getter
@AllArgsConstructor
public enum SysPerTypeEnum {
    /**
     * 以下用到key，未用到roleCode
     */
    DIRECTORY(0, "目录"),
    MENU(1, "菜单"),
    ACTION(2, "操作、按钮"),

    ;

    private final Integer key;
    private final String value;

    public static String getValueByKey(Integer key) {
        for (SysPerTypeEnum h : SysPerTypeEnum.values()) {
            if (h.getKey().equals(key)) {
                return h.getValue();
            }
        }
        return null;
    }


}
